package service

import (
	"context"
	"mldong/api/base"
	menuApi "mldong/api/menu"
	"reflect"
)

type IMenuService interface {
	/**
	* 添加菜单
	 */
	Save(ctx context.Context, req *menuApi.SaveReq) (res bool, err error)
	/**
	* 修改菜单
	 */
	Update(ctx context.Context, req *menuApi.UpdateReq) (res bool, err error)
	/**
	* 删除菜单
	 */
	Remove(ctx context.Context, ids []string) (res bool, err error)
	/**
	* 菜单详情
	 */
	Detail(ctx context.Context, id string) (res menuApi.MenuVO, err error)
	/**
	* 菜单分页查询
	 */
	Page(ctx context.Context, req *menuApi.PageReq) (res menuApi.MenuPageVO, err error)
	/**
	* 菜单列表
	 */
	List(ctx context.Context, req *menuApi.ListReq) (res []*menuApi.MenuVO, err error)
	/**
	* 菜单树
	 */
	Tree(ctx context.Context, req *menuApi.TreeReq) (res []*menuApi.MenuVO, err error)
	/**
	* 应用列表
	 */
	AppList(ctx context.Context) (res []base.LabelValueVO, err error)
	/**
	* 同步前端路由
	 */
	SyncRoute(ctx context.Context, param []*menuApi.SyncRouteParam) (res bool, err error)
	/**
	* 用户路由菜单
	 */
	UserRouteMenu(ctx context.Context, userId string, version string) (res []*menuApi.RouteMenuVO, err error)
}

var MenuServiceType = reflect.TypeOf((*IMenuService)(nil)).Elem()
